package xyz.erupt.flow.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import xyz.erupt.upms.model.EruptRole;

import java.util.List;

public interface EruptRoleRepository extends JpaRepository<EruptRole, Long> {
    @Query("from EruptRole where code like concat('%',:keyword,'%') or name like concat('%',:keyword,'%') order by sort asc ")
    List<EruptRole> findAllByKeyword(@Param("keyword") String keyword);
}
